An R Companion to Applied Regression by John Fox Sanford Weisberg
Author:John Fox,Sanford Weisberg
Language: eng
Format: epub
Publisher: Sage Publications Inc.
Published: 2010-11-29T05:00:00+00:00
An alternative to changing the contrasts of individual factors is to reset the global contrasts option: for example,
> options(contrasts = c("contr.sum", "contr.poly"))
These contrast-generating functions would then be used by default for all subsequent model fits. In setting the contrasts option, we must specify contrasts for both unordered and ordered factors. Contrasts can also be set as an argument to the lm function (see Section 4.8.8).
4.6.3 ORDERED FACTORS AND ORTHOGONAL POLYNOMIALS
R has a built-in facility for working with factors that have ordered levels. The default contrast-generating function for ordered factors is contr.poly , which creates orthogonal-polynomial contrasts. Suppose, for example, that we treat the variable fcategory in the Moore data set as an ordered factor:
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
| Anthropology | Archaeology |
| Philosophy | Politics & Government |
| Social Sciences | Sociology |
| Women's Studies |
The Great Music City by Andrea Baker(32738)
Cecilia; Or, Memoirs of an Heiress — Volume 1 by Fanny Burney(32663)
Cecilia; Or, Memoirs of an Heiress — Volume 2 by Fanny Burney(32028)
Cecilia; Or, Memoirs of an Heiress — Volume 3 by Fanny Burney(32011)
We're Going to Need More Wine by Gabrielle Union(19125)
All the Missing Girls by Megan Miranda(16433)
Pimp by Iceberg Slim(14719)
For the Love of Europe by Rick Steves(14682)
Bombshells: Glamour Girls of a Lifetime by Sullivan Steve(14153)
Norse Mythology by Gaiman Neil(13482)
Talking to Strangers by Malcolm Gladwell(13476)
Fifty Shades Freed by E L James(13310)
Mindhunter: Inside the FBI's Elite Serial Crime Unit by John E. Douglas & Mark Olshaker(9454)
Crazy Rich Asians by Kevin Kwan(9367)
The Lost Art of Listening by Michael P. Nichols(7572)
Enlightenment Now: The Case for Reason, Science, Humanism, and Progress by Steven Pinker(7375)
The Four Agreements by Don Miguel Ruiz(6860)
Bad Blood by John Carreyrou(6692)
Weapons of Math Destruction by Cathy O'Neil(6402)